/**
 * Copyright 2012 Google, Inc. All Rights Reserved.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

/**
 * @author benvanik@google.com (Ben Vanik)
 */

@import "wtf/ui/styles/reset.less";
@import "wtf/ui/styles/css3.less";
@import "wtf/ui/styles/common.less";
@import "wtf/ui/styles/kennedy.less";

body {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
}

.popup {
  cursor: default;
  text-align: left;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-style: normal;
  color: black;

  min-width: 350px;

  .noSelect();

  & .header {
    position: relative;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    margin: 5px;

    height: 36px;

    table {
      position: absolute;
      width: 100%;
      height: 100%;
      td {
        vertical-align: middle;
      }
    }

    h1 {
      font-size: 16px;
      line-height: 24px;
      font-weight: normal;
      color: #222;
      margin: 0;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: default;
      outline: none;
    }
    a:focus {
      outline: none;
    }
    span {
      vertical-align: bottom;
    }
  }

  & .contents {
    margin: 5px;
    overflow-x: hidden;
    overflow-y: scroll;
    position: relative;

    & .featureGroup {
      margin: 5px;
      width: 100%;

      & .featureTitle {
        font-size: 16px;
        display: block;
        color: #333;
        cursor: default;
        text-decoration: none;
        margin-bottom: 5px;
      }

      & .buttons {
        width: 100%;
        .kButtonBar {
          display: table-cell;
        }
      }
    }

    & .disableOverlay {
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      z-index: 10;

      & .mask {
        position: absolute;
        left: 0;
        top: 0;
        right: 0;
        bottom: 0;
        background-color: white;
        opacity: 1;
      }
      & .buttons {
        position: absolute;
        width: 100%;
        height: 100%;
        td {
          vertical-align: middle;
        }
      }
    }
  }

  & .footer {
    margin: 5px;

    .labelButton {
      display: block;
      padding: 5px;
      border-top: 1px solid #ebebeb;
      a {
      }
      a:visited {
        color: #1155CC;
      }
    }
  }
}

.buttonBar {
  min-width: 12px;
  white-space: nowrap;
}

.addonPicker {
  .noSelect();
  cursor: default;

  margin-top: 15px;
  width: 100%;

  table {
    width: 100%;
    margin-top: 3px;
  }
  tbody {
    tr {
      height: 21px;

      &:hover {
        background-color: #f8f8f8;
      }
    }
    td {
      vertical-align: bottom;

      span {
        overflow: hidden;
        text-overflow: ellipsis;
        width: 220px;
        display: inline-block;
      }
      input[type="checkbox"] {
        margin-top: 2px;
      }
    }
  }

  .emptyRow {
    td {
      vertical-align: baseline;
    }
  }

  .remove {
    vertical-align: baseline;
    width: 18px;
    img {
      position: absolute;
      width: 21px;
      height: 21px;
      content: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" width="21px" height="21px"><polygon points="15,6.414 13.586,5 10,8.586 6.414,5 5,6.414 8.586,10 5,13.586 6.414,15 10,11.414 13.586,15 15,13.586 11.414,10"/></svg>');
    }
  }

  .addRow {
    input {
      margin-top: 3px;
      width: 100%;
    }
  }
}
